package com.wwm.springcloud.authservice.service.impl;

import com.wwm.springcloud.authservice.bean.PortalUser;
import com.wwm.springcloud.authservice.dao.IAccountDao;
import com.wwm.springcloud.authservice.service.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("accountService")
public class AccountService implements IAccountService
{
    @Autowired
    private IAccountDao dao;

    /**
     * 根据用户登录名获得对应的权限信息.
     */
    @Override
    public PortalUser getUserInfo(String userName)
    {
        // 根据登录名(userName)获得对应的信息
        PortalUser user = dao.getUserByloginName(userName);
        return user;
    }
}